<template>
  <div>
    <Authc permissions="trade:payment:payOrder">
      <div>
        <a @click="handleDetail('detele')">详情</a>
        <!-- <a @click="handleDetail('pay')">支付</a>
        <a style="margin: 0 4px;" @click="handleDetail('refundOrdersDetail')">退款</a>
        <a @click="handleDetail('delete')">删除</a> -->
        <!-- <Tooltip placement="top" content="支付">
          <Icon class="normal-icon-style" type="md-list-box" @click="handleDetail('pay')" />
        </Tooltip>
        <Tooltip placement="top" content="退款">
          <Icon class="normal-icon-style" type="ios-magnet-outline" @click="handleDetail('refundOrdersDetail')" />
        </Tooltip>
        <Tooltip placement="top" content="删除">
          <Icon class="normal-icon-style" type="ios-trash" @click="handleDetail('delete')" />
        </Tooltip> -->
      </div>
    </Authc>
  </div>
</template>
<script>
  import {
    Icon,
    Tooltip,
    Message,
    Modal
  } from "view-design";
  import {
    namespace
  } from "../../Module/payOrder.js";
  import Authc from "@/components/Authc";

  export default {
    props: {
      row: Object
    },
    model: {
      event: ["onEdit"]
    },
    components: {
      Icon,
      Tooltip,
      Message,
      Authc
    },
    data: function() {
      return {};
    },
    methods: {
      handleDetail(type) {
        let id = this.$props.row.id;
        switch (type) {
          case 'pay':
            this.$router.push("/pay/admin/payCenter/payDetailForm");
            break
          case 'refundOrdersDetail':
            this.$router.push("/pay/admin/payCenter/refundDetailForm");
            break
          case 'detele':
            this.$router.push({path: 'PayOrderDetele', query: {
              id: id
            }});
            break
          case 'delete':
            Modal.confirm({
              render: (h, params) => {
                return h('div', [
                  h('div', {
                    class: 'selfConfirm'
                  }, '确定删除?')
                ]);
              },
              onOk: () => {
              }
            })
            break
        }
      }
    }
  };
</script>
<style lang="less">
  .normal-icon-style {
    font-size: 20px !important;
    color: #57a3f3 !important;
  }

  .error-icon-style {
    font-size: 20px !important;
    color: #ff0000 !important;
  }
</style>
